import request from "./request";

// 获取文章列表数据
export const getArticleList = (obj) => {
  return request.get('/admin/interview/query', {
    params: {
      current: obj.current,
      pageSize: obj.pageSize
    }
  })
}

// 添加面经
export const addArticle = (obj) => {
  return request.post('/admin/interview/create', {
    stem: obj.stem,
    content: obj.content
  })
}

// 获取面经列表
export const getArticleDetail = (id) => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}
// 更新面经列表详情
export const putArticleDetail = (obj) => {
  return request.put('/admin/interview/update', {
      id: obj.id,
      stem: obj.stem,
      content: obj.content,
  })
}
// 删除面经列表
export const deleteArticle = (id) => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}